package com.ch.forum.controller;

import com.ch.forum.bo.ResponseResult;
import com.ch.forum.service.AdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@RequestMapping("/ad")
@Controller
public class AdController {

    @Autowired
    private AdService adService;

    @GetMapping()
    @ResponseBody
    public ResponseResult findAll(){
        return adService.findAll();
    }
}
